Field
This application relates to methods of establishing communications between an application specific USB peripheral and a host. More specifically, the application relates to methods for performing general purpose USB communications between the application specific USB devices and the hosts wherein the host may have various hardware configurations and the host may execute various operating systems.
Related Art
Universal Serial Bus (USB) is a serial bus interface between a host computer and a peripheral device conforming to the USB specification. The USB Implementers Forum (USB-IF) defines the USB specification including, for example, mechanical connectors, wiring, electrical characteristics, communications protocols, and even the embossed logos. USB-IF is organized as USB IMPLEMENTERS FORUM, INC. an Oregon nonprofit mutual benefit corporation, with materials available at http://www.usb.org/. In particular, the USB serial bus specification found in USB-IF documented entitled USB_20.PDF and USB-IF Printer class protocol specification found in USBPRINT11.PDF from the USB-IF.
Host, as used herein, includes, for example, a single-processor computer, multiprocessor computer, multi-core computer, minicomputers, mainframe computer, supercomputers, distributed computers, personal computer, hand-held computing devices, tablet, smart phone, gaming consoles, gaming devices, smart TV, USB enabled stereo receiver, set top box devices, DVD players, CD players, Blu-ray players, personal digital assistant (PDA), point of sale (POS) terminals, programmable logic controllers (PLC), embedded computers, single board computer (SBC), network routers, network firewalls, network devices, virtual machines, virtual machine monitors (VMM), and hypervisors. The host may be configured to include memory, screen, keyboard, mouse, storage devices, and so forth, in various aspects. The host may execute various host operating systems (host OS) such as, for example, Microsoft Windows, Linux, UNIX, MAC OS X, real time operating system (RTOS), VxWorks, INTEGRITY, Android, iOS, or a monolithic software or firmware implementation without a defined traditional operating system.
Application specific USB peripheral, as used herein, includes specialized non-printer devices such as data acquisition equipment, industrial controls, SCADA, scientific equipment, encryption devices, communications electronics, mass data storage, radio frequency devices, information displays, cryptographic accelerators, global position systems (GPS), global navigation satellite systems (GNSS), cellular communications equipment, user input devices, biometric devices, in-circuit-emulators, software debuggers, operating system debuggers, FLASH device programmers, virtual peripherals, smart grid equipment, power line communications devices, medical instrumentation, exercise equipment, software protection dongles, thermometers, uninterruptable power supplies, audio controls, lighting equipment, telephony devices, motion control, robotics, various sensors, configured to communicate with the host via USB. Application specific USB peripheral, as used herein, excludes printers.
USB is considered a master-slave bus architecture. The host (the master) controls communications with the application specific USB peripheral (the slave) and the host controls the operations of the application specific USB peripheral. The application specific USB peripheral cannot communicate or be controlled via the USB bus without a host controlling the USB bus. An application specific controller executing on the host may control the operation of the application specific USB peripheral, the application specific controller may send data to the application specific USB peripheral, and the application specific controller may receive data from the application specific USB peripheral, and the application specific controller may process data received from the application specific USB peripheral.
In some aspects, the application specific controller executing on the host communicates with the application specific USB peripheral using the Application Specific or Vendor Specific classes (USB class codes 0xFE and 0xFF hexadecimal). In such aspects, an application specific USB peripheral driver interfaces the application specific USB peripheral with the host including the application specific controller. The application specific USB peripheral driver may be implemented in software operatively received by the host. However, the application specific USB peripheral driver may be difficult or costly to implement and maintain. For example, each different host operating system requires a corresponding distinct application specific USB peripheral driver. Accordingly, distinct application specific USB peripheral drivers would need to be provided for a various hosts executing, for example, Microsoft Windows, Linux, or MAC OS X. Different operating system versions or revisions may require different application specific USB peripheral drivers. For example, the application specific USB peripheral driver for a host executing Windows XP differs from the application specific USB peripheral driver for a host executing Windows 7 64-bits. As the operating system is updated, the application specific USB peripheral driver may require updating as well.
Data transfer rates for an application specific USB peripheral using the vendor specific class or the application specific class and corresponding application specific USB peripheral driver may be dependent upon dependent on USB bus speed. The different USB bus speeds are low speed (LS), full speed (FS), high speed (HS) and Super Speed (SS), in various aspects. The different speed ratings in megabits per second (Mbps) defined for USB 2.0 are: LS 1.5 Mbps, FS 12 Mbps, HS 480 Mbps. The USB 3.0 SS is 5 gigabits per second (Gbps). Data transfer rates for the application specific USB peripheral using the vendor specific class or the application specific class and corresponding application specific USB peripheral driver may be estimated as approximately 169 KB/second for LS, 1.35 MB/second for FS, and 54 MB/second for HS (estimates=0.9×USB bus speed/8.0).
In other aspects, the application specific USB peripheral may be interfaced with the host using the USB Human Interface Device (HID) Class (USB class code 0x03 hexadecimal). Use of the USB HID class often does not require writing an application specific USB peripheral driver. Many computer operating systems support USB HID class including Microsoft Windows, Linux, and Mac OS X. The USB HID class definition contains provisions to support general purpose (or generic) communications to/from an application specific USB peripheral.
However, the USB HID class was designed to accept user inputs from devices such as a keyboard or a mouse. A user, for example, may type 2 characters per second or less. Because of the intended usage, the USB HID class interface is slow and is considered quite low performance and limiting in function. For example, a theoretical maximum data transfer rate through the USB HID class is 64 KB/second because data transfer is limited to 64 byte USB data packets at a maximum of 1,000 times per second regardless of the USB bus speed. Practical implementations of the USB HID class may be less than this theoretical maximum data transfer rate, for example, a data transfer rate of less than 50 KB/second. Thus, USB HID class may be too slow for many application specific USB peripherals. The alternative to using the USB HID class is using the vendor specific class or the application specific class and corresponding application specific USB peripheral driver, therefore developing and supporting costly and difficult application specific USB peripheral drivers.
Accordingly, there is a need for improved apparatus as well as related methods for connecting an application specific USB peripheral to a host.